{% load i18n %}
<style>
    #tbl_balances,#tbl_balances  tr,#tbl_balances tr th,#tbl_balances tr td{
        color: #787777;
        text-align: left;
    }
    .trade-btn{
        cursor: pointer;
        line-height: 1.42857143;
        color: #0e75ee;
        background:none;
        text-decoration: none;
    }
    .table thead tr th{
        background: #fff;
        border: 0px;
    }
    .table tbody tr td{
        border: 0px;
    }
</style>
<script id="temp_balances" type="text/html">
    <table id="tbl_balances" class="table table-hover table-striped">
        <thead>
            <tr class="">
                <th style="width:20%;">{% trans '币种' %}</th>
                <th style="width:20%;">{% trans '可用' %}</th>
                <th style="width:20%;">{% trans '委托/提现' %}</th>
                <th style="width:20%;">{% trans '总额' %}</th>
                <th style="width:10%;">{% trans '提现' %}</th>
                <th style="width:10%;"><div class="f-fr"> {% trans '充值' %} </div></th>
            </tr>
        </thead>
        <tbody class="">
            <% for(i = 0; i < jsonobj.length; i ++ ){ %>
                <%  var info = jsonobj[i] %>
                <%  var name = info.coin_type %>
                <%  var coin_type_info = coin_info[info.coin_type] %>
                <%  if (!coin_type_info){ %>
                <%      $imports.log("coin_type no in g_coin_info , coin_type : " + info.coin_type) %>
                <%      continue %>
                <%  } %>
                <%  var icon_url = $imports.get_coin_icon_url(info.coin_type) %>
                <%  var show_coin = "<img class=\"svg \"  src=\"" + icon_url +"\"/>&nbsp" + coin_info[info.coin_type].name_upper %>

                <%  var tofixed = 2 %>
                <%  if (name == 'bitcny') { %>
                <%  } else { %>
                <%       tofixed = $imports.coin_tofixed(info.coin_type) %>
                <%  } %>

                <%  var amount = $imports.floor_number(info.amount * 1, tofixed) %>
                <%  var freeze = $imports.floor_number(info.freeze * 1, tofixed)%>
                <%  var cnt = freeze + amount %>
                <%  if (cnt < 0.00001) { %>
                <%      continue %>
                <%  } %>
                <tr class="<%=cls%>" >
                    <td style="width:20%;" ><%-show_coin%></td>
                    <td style="width:20%;"><%=amount%></td>
                    <td style="width:20%;"><%=freeze%></td>
                    <td style="width:20%;"><%=cnt%></td>

                    <!--
                    <td>充值</td>
                    <td>提现</td>

                    <td><a href="/btc/withdraw?coin_type=<%=name%>" target="_blank" class="btn btn-xs btn-success btn-block">{% trans '提现' %}</a></td>
                    <td ><a href="/btc/deposit?coin_type=<%=name%>" target="_blank"  class="btn btn-xs btn-success btn-block f-fr">{% trans '充值' %}</a></td>
                -->
                    <td style="width:10%;"><a href="/btc/userinfo_balances" target="_blank" class="trade-btn">{% trans '提现' %}</a></td>
                    <td style="width:10%;"><div class="f-fr"><a href="/btc/userinfo_balances" target="_blank"  class="trade-btn">{% trans '充值' %}</a></div></td>
                </tr>
                <%}%>
        </tbody>
    </table>
</script>

